<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>添加客户</title>
<script type="text/javascript">
	/**查找带回机构信息*/
	function lookUpExpressCompany() {
		$.pdialog.open('expressCompanyLookUp', 'expressInfo', '公司信息', {
			width : 800,
			height : 400,
			mask : true
		});
	}
	
	
	/**
	 * 选择省市区，触发变化，表单参数值传入隐藏域
	 */
	function startAreaOnChange(obj){
		var $obj = $(obj);
		var text = $obj.find("option:selected").text();
		$("#select_startProvinceName").val(text); 
	}
	
	function endAreaOnChange(obj){
		var $obj = $(obj);
		var text = $obj.find("option:selected").text();
		$("#select_endProvinceName").val(text); 
	}


</script>
</head>
<body>
	<div class="pageContent">
		<form class="pageForm required-validate" method="post" action="addOriginPriceAction.action" onsubmit="return validateCallback(this, navTabAjaxDone);">
			<input type="hidden" name="rightId" value="${rightId}" />
			<div class="pageFormContent" layoutH="56">
				<table>
					<tr>
						<td>面单价格：</td>
						<td><input name="billPrice" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>操作费：</td>
						<td><input name="operationPrice" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>首重：</td>
						<td><input name="startPrice" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>续重：</td>
						<td><input name="heavyPrice" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>发货点名称：</td>
						<td><input type="text" name="originName" class="required"  bringBackName="origin.originName" readonly="readonly" size="30" class="required textInput valid" /> 
						<input type="hidden" name="originId" bringBackName="origin.originId"   /> 
						<a class="btnLook" href="originLookUp"  lookupGroup="origin" >查找带回</a></td>
					</tr>
					<tr>
					<td>始发地：</td>
						<td><select onChange="startAreaOnChange(this)"  name="startProvinceId">
							<option value="" >不限</option>
								<c:forEach items="${areaList}" var="li">
									<option value="${li.id}">${li.name}</option>
								</c:forEach>
						</select>
						<input id="select_startProvinceName" name="startProvinceName" type="hidden"/>
						</td>
					</tr>

					<tr>
						<td>目的地：</td>
						<td><select onChange="endAreaOnChange(this)" name="endProvinceId">
								<option value="" >不限</option>
								<c:forEach items="${areaList}" var="li">
									<option value="${li.id}">${li.name}</option>
								</c:forEach>
						</select> 
						<input id="select_endProvinceName" name="endProvinceName" type="hidden"/>
						</td>
					</tr>
					
				</table>
			</div>
			<div class="formBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">保存</button>
							</div>
						</div></li>
					<li>
						<div class="button">
							<div class="buttonContent">
								<button type="button" class="close">取消</button>
							</div>
						</div></li>
				</ul>
			</div>
		</form>
	</div>
</body>
</html>